let hotSearchUrl = '';
let indexUrl = '';
let phoneCodeUrl = '/sys/user/checkOnlyUser' //判断用户是否存在 true  
let phoneLoginUrl = "/sys/phoneLogin"
const install = (Vue,vm) => {
	//demo 
	let demoGetCode = (params = {}) => vm.$u.get(phoneCodeUrl, params);
	//手机号登录
	let phoneLogin = (params = {}) => vm.$u.post(phoneLoginUrl, params);
	// 此处没有使用传入的params参数 搜索接口
	let getSearch = (params = {}) => vm.$u.get(hotSearchUrl, {
		id: 2
	});
	// 此处使用了传入的params参数，一切自定义即可
	let getInfo = (params = {}) => vm.$u.post(indexUrl, params);
	// 将各个定义的接口名称，统一放进对象挂载到vm.$u.api(因为vm就是this，也即this.$u.api)下
	vm.$u.api = {getSearch, getInfo,demoGetCode,phoneLogin};
}
export default {
	install
}